<?php $this->load->library('urlutility');?>
<style>
#prev {
	margin-top:-313px;
}
#next {
	margin-top:-313px;
}
</style>
<script type="text/javascript" language="javascript">
	$(function() {
		$('#prev').addClass('hide');
		$('#next').addClass('hide');
		$('#foo0').carouFredSel({
			auto:{pauseOnHover: 'resume'},
			scroll:1,
			prev: '#prev',
			next: '#next',
		});
		$('.list_carousel').mouseover(function(){
			$('#prev').removeClass('hide');
			$('#next').removeClass('hide');						  
		});
		$('.list_carousel').mouseout(function(){
			$('#prev').addClass('hide');
			$('#next').addClass('hide');						  
		});
	});
</script>
<?php if(count($listbanner)>0){?>
<div class="list_carousel ov_fl_hidden h277">
  <ul id="foo0" class="h277">
    <?php foreach($listbanner as $banner){?>
    <li> <a href="<?php echo $this->urlutility->getpackage_information($banner['packageid'],$data[0]['title'],'?from='.$_GET['from'].'&cate='.$_GET['cate'].'&page='.$_GET['page']);?>" class="item ov_fl_hidden"> <img width="886" height="370" class="fl bder_t1_8fa8bc" src="<?php echo base_url(); ?>uploads/packagebanner/<?php echo $banner['avatar'] ?>"/> </a>
    </li>
    <?php }?>
  </ul>
  <a href="javascript:void(0);" id="prev" class="fl"><img src="<?php echo base_url(); ?>public/images/btn_prev.gif"/></a> <a href="javascript:void(0);" id="next" class="fr"><img src="<?php echo base_url(); ?>public/images/btn_next.gif"/></a> </div>
<?php }?>
<a href="<?php echo base_url(); ?>home/package/package_customize"><img width="100%" class="fl" src="<?php echo base_url(); ?>public/images/baner3_03.jpg"> </a>
<div class="fl w660">
  <h1 class="orange item ff_museo700 mgb0">Pack Search Result</h1>
  <div class="item bder_d5 txt_indent20 pdt5 pdb5">Sort by&nbsp;&nbsp;
    <select id="priority" class="f11 gray bder_d5">
      <option value="Length">Length</option>
      <option value="Price">Price</option>
      <option value="recommendations">Our recommendations</option>
    </select>
    <script>
    	$('#priority').change(function(){
			$.get('<?php echo base_url(); ?>home/ajax/getajax_pagckage_search_result?priority='+$('#priority').val(),{provide:'<?php echo $_GET['provide'] ?>',from:'<?php echo $_GET['from'] ?>',cate:'<?php echo $_GET['cate'] ?>',page:'<?php echo $_GET['page'] ?>'},function(data){			
				$('#boxpackage').html(data);	
			});	
		});
    </script>
  </div>
  <div id="boxpackage">
    <?php if(isset($data)) {
    foreach($data as $item) {
    ?>
    <div class="item bder_b1_d5 pdt12 pdb10">
      <h3 class="blue ff_museo700 mgt0 mgb12 pdl10 f16"><?php echo $item['title']; ?> <br /><span class="ff_museo500 gray lighter f13 italic"><?php echo $item['destination'] ?></span></h3>
      <a href="<?php echo $this->urlutility->getpackage_information($item['id'],$item['title'],'?provide='.$_GET['provide'].'&from='.$_GET['from'].'&cate='.$_GET['cate'].'&page='.$_GET['page']);?>"><img width="97" height="75" class="fl mgr8 pdl10" alt="Best of Myanmar - <?php echo $item['destination']." - ".$item['title'] ?>" title="Best of Myanmar - <?php echo $item['destination']." - ".$item['title'] ?>" src="<?php echo base_url(); ?>uploads/package/<?php echo $item['avatar']; ?>"/></a>
      <div class="fl w293"><span class="black"><?php if($item['category']==1) echo "Special Offers";
	  															if($item['category']==2) echo "Cultural";
																if($item['category']==3) echo "Adventure & Active";
																if($item['category']==4) echo "Pilgrimage";
																if($item['category']==5) echo "Eco & Social"; ?></span><br>
        <span class="black"><?php echo $item['promotion']; ?><!-- <a class="blue" href="<?php echo $this->urlutility->getpackage_information($item['id'],$item['title'],'?provide='.$_GET['provide'].'&from='.$_GET['from'].'&cate='.$_GET['cate'].'&page='.$_GET['page']);?>">...more »</a>--></span> </div>
      <div class="fr txt_center ff_museo700 w60 f11"> <strong class="f18 orange">$<?php echo $item['price']; ?></strong><br>
        for 1 pax <a class="item ff_museo500 bgr_143167 white pdt4 pdb3 mgt4 f14 cursor_poiter" href="<?php echo $this->urlutility->getpackage_information($item['id'],$item['title'],'?provide='.$_GET['provide'].'&from='.$_GET['from'].'&cate='.$_GET['cate'].'&page='.$_GET['page']);?>">DETAILS</a> </div>
    </div>
    <?php }}?>
  </div>
  <?php
	  if($_GET['page']!=NULL){
	  	if($_GET['page']>1) $back=(intval($_GET['page'])-1);
		if($_GET['page']>0 && $_GET['page']<=(ceil(count($total))-1)) $next=(intval($_GET['page'])+1);
	  ?>
  <div class="item pdt16 pdb16">
    <div class="fr"> <a href="<?php if($_GET['page']>1){ echo base_url()."home/package/package_search_result?provide=".$_GET['provide']."&from=".$_GET['from']."&cate=".$_GET['cate']."&page=".$back;}else echo "javascript:void(0);"; ?>" class="bder_d5 fl pdt4 pdb4 pdl7 pdr9 mgl5"><img width="10" height="15" src="<?php echo base_url(); ?>public/images/arrow_01.jpg" class="fl"></a>
      <?php
		  for($i=1;$i<=ceil(count($total)/10);$i++){?>
      <a href="<?php echo base_url()?>home/package/package_search_result?provide=<?php echo $_GET['provide']?>&from=<?php echo $_GET['from'] ?>&cate=<?php echo $_GET['cate']?>&page=<?php echo $i ?>" class="bder_d5 fl pdt4 pdb4 txt_center w24 mgl5 black"><?php echo $i ?></a>
      <?php }?>
      <a href="<?php if($_GET['page']<=(ceil(count($total)-1))){ echo base_url()."home/package/package_search_result?provide=".$_GET['provide']."&from=".$_GET['from']."&cate=".$_GET['cate']."&page=".$next;}else echo "javascript:void(0);"; ?>" class="bder_d5 fl pdt4 pdb4 pdl9 pdr7 mgl5"><img width="10" height="15" src="<?php echo base_url(); ?>public/images/arrow_03.png" class="fl"></a> </div>
  </div>
  <?php }?>
</div>
<div class="fr w193">
  <h3 class="bgr_orange white ff_museo500 f15 item pdt6 pdb5 txt_indent10 mgt13 mgb3 lighter">Category</h3>
  <div class="item">
    <input type="checkbox" name="cate" <?php if($_GET['cate']==1) echo "checked='checked'";?> value="1" onclick="search_cate(1);" class="fl mgl10 mgt1">
    Special Offers</div>
  <div class="item">
    <input type="checkbox" name="cate" <?php if($_GET['cate']==2) echo "checked='checked'";?> value="2" onclick="search_cate(2);"  class="fl mgl10 mgt1">
    Cultural</div>
  <div class="item">
    <input type="checkbox" name="cate" <?php if($_GET['cate']==3) echo "checked='checked'";?> value="3" onclick="search_cate('3');"  class="fl mgl10 mgt1">
    Adventure & Active</div>
  <div class="item">
    <input type="checkbox" name="cate" <?php if($_GET['cate']==4) echo "checked='checked'";?> value="4" onclick="search_cate(4);"  class="fl mgl10 mgt1">
    Pilgrimage</div>
  <div class="item">
    <input type="checkbox" name="cate" <?php if($_GET['cate']==5) echo "checked='checked'";?> value="5" onclick="search_cate(5);"  class="fl mgl10 mgt1">
    Eco & Social</div>
  <h3 class="item mgt0 mgb0 blue bgr_gray txt_indent10 ff_museo500  pdt10 pdb10 mgt15">Design by our guest</h3>
  <div class="item pdb15"> <img width="100%" src="<?php echo base_url(); ?>public/images/imgbanner2_03.jpg"> <a class="item txt_indent10 gray" href="#">by <strong>Peter Ruig - London</strong></a> </div>
  <div class="item pdb15"> <img width="100%" src="<?php echo base_url(); ?>public/images/imgbanner2_03.jpg"> <a class="item txt_indent10 gray" href="#">by <strong>Peter Ruig - London</strong></a> </div>
  <div class="item pdb15"> <img width="100%" src="<?php echo base_url(); ?>public/images/imgbanner2_03.jpg"> <a class="item txt_indent10 gray" href="#">by <strong>Peter Ruig - London</strong></a> </div>
  <div class="item pdb15"> <img width="100%" src="<?php echo base_url(); ?>public/images/imgbanner2_03.jpg"> <a class="item txt_indent10 gray" href="#">by <strong>Peter Ruig - London</strong></a> </div>
</div>
<script>
	function search_cate(numberofcate){
		location.assign('<?php echo base_url();?>home/package/package_search_result?provide=<?php echo $_GET['provide']?>&from=<?php echo $_GET['from'] ?>&cate='+numberofcate+'&page=1');
	}
</script>
